
/*
 * Sample 1
 * This source file contains an example program written in SALSA!
 */

;; fib-aux :: int int int -> int
(define (fib-aux n acc)
  (if (= n 1)
      acc
      (fib-aux (- n 1) (* n acc) )))

;; fib :: int -> int
(define (fib n)
  (if (< n 0)
      "Error"
      (fib-aux n 1)))

(fib 6) ; calling fib with 6


